home *** CD-ROM | disk | FTP | other *** search
/ Mesolore / Mesolore - Disc 2.iso / mac / data / Atlas.dir / 00107_Script_107 < prev    next >
Text File  |  2001-01-26  |  693b  |  27 lines

  1. on mouseDown
  2.  
  3.   thloc=the loch of sprite 2
  4.   tvloc=the locv of sprite 2
  5.   phloc = the loch of sprite 1
  6.   mhloc = the mouseH
  7.   pvloc = the locv of sprite 1
  8.   mvloc = the mousev
  9.   repeat while the mousedown
  10.     mhdelta = the mouseh - mhloc
  11.     mvdelta = the mousev - mvloc
  12.     h=phloc + mhdelta
  13.     v=pvloc + mvdelta
  14.     if h < 120 then h = 120
  15.     if h > 720 then h = 720
  16.     if v < -119 then v = -119
  17.     if v > 627 then v = 627
  18.     set the loch of sprite 1 = h
  19.     set the locv of sprite 1 = v
  20.     deltah = h - phloc
  21.     deltav = v - pvloc
  22.     set the loch of sprite 2 = thloc + deltah
  23.     set the locv of sprite 2 = tvloc + deltav
  24.     updatestage
  25.   end repeat
  26. end
  27.